package com.xayy.health.mgt.model;

import com.xayy.health.core.config.param.ModelFaultParams;
import com.xayy.health.mgt.model.dto.TimeDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 算法模型训练对象
 *
 * @author Nie
 * @version v1.0
 * @date 2022-05-11 11:44
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ModelTrain {

    @ApiModelProperty(value = "模型名称")
    private String modelName;

    @NotNull
    @ApiModelProperty(value = "模型类型")
    private Integer modelType;

    @ApiModelProperty(value = "算法名称")
    private String algorithmName;

    @ApiModelProperty(value = "卫星标识")
    private String satelliteMid;

    @ApiModelProperty(value = "卫星代号")
    private String satelliteCode;

    @NotEmpty
    @ApiModelProperty(value = "参数代号")
    private String paramCode;

    @ApiModelProperty(value = "参数名称")
    private String paramCodeName;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    @ApiModelProperty(value = "多组故障时间")
    private List<ModelFaultParams> dates;

    @ApiModelProperty(value = "门限值")
    private String threshold;

    @ApiModelProperty(value = "是否是多参数", notes = "单参数传false")
    private Boolean checkMultiparameter;

    @ApiModelProperty(value = "多参数算法名称（存的是id）")
    private String multiparameterAlgName;

    private List<AlgorithmParams> algorithmParamList;

    private List<String> paramCodes;

    @ApiModelProperty(value = "排除故障时间段")
    ArrayList<String> timeList;
    @ApiModelProperty(value = "旧模型名称")
    private String oldModelName;

    private DiagnoseUpdateModelParam diagnoseUpdateModelParams;

    /**
     * 均值需要的参数   pointNum，sampleTime，interval，probability
     */
    @ApiModelProperty(value = "连续取点个数")
    private String pointNum;

    @ApiModelProperty(value = "取值时间")
    private String sampleTime;

    @ApiModelProperty(value = "间隔点数")
    private String interval;

    @ApiModelProperty(value = "概率")
    private String probability;

    @ApiModelProperty(value = "偏差比")
    private String deviate;

    @ApiModelProperty(value = "均值特征传递的json数据")
    private Map<String, Object> telemetryDataList;

    @ApiModelProperty(value = "正常开始时间遥测")
    private Map<String, List<TelemetryData>> normalTimeTelemetryDataList;

    /**
     * 双参数（使用）
     */
    @ApiModelProperty(value = "正常开始时间")
    private Date normalStartTime;

    @ApiModelProperty(value = "正常结束时间")
    private Date normalEndTime;

    @ApiModelProperty(value = "偏差值")
    private Double compare;

    @ApiModelProperty(value = "是否是案例一", required = true)
    private Integer isCaseOne;

    @ApiModelProperty(value = "自动运行需要-任务名称")
    private String name;

    @ApiModelProperty(value = "自动运行需要-周期")
    private String cycle;

    @ApiModelProperty(value = "学习多段时间", required = true)
    private List<TimeDto> learnMultiTerminalTime;

    @ApiModelProperty(value = "检测时间", required = true)
    private TimeDto verifyTime;

    @ApiModelProperty(value = "卫星名称")
    private String satelliteName;
}

